package com.caigou.bean.exam.param;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

@Data
@ApiModel(description = "用户注册")
public class RegisterUserParam {

    @NotBlank(message = "不可为空")
    @Pattern(regexp = "^1[3456789]\\d{9}$",message = "手机号格式不正确")
    @ApiModelProperty(value = "用户名(手机号)", name = "username", required = true,example = "18310013577")
    private String username;

    @NotBlank(message = "不可为空")
    @Pattern(regexp = "^[a-zA-Z0-9_]+$",message = "请输入6-18数字和字母,且密码不可包含特殊字符")
    @Size(min = 6,max = 18,message = "请输入6-18字符密码,且密码不可包含特殊字符")
    @ApiModelProperty(value = "密码", name = "password", required = true,example = "741852963")
    private String password;

    @NotBlank(message = "不可为空")
    @Size(min = 4,max = 6,message = "验证码长度有误")
    @ApiModelProperty(value = "短信验证码", name = "msgCode", required = true,example = "6672")
    private String msgCode;//短信验证码



}
